package cn.edu.nsmc.modules.sys.controller;

import cn.edu.nsmc.common.utils.R;
import cn.edu.nsmc.modules.sys.entity.SysUserEntity;
import cn.edu.nsmc.modules.sys.entity.form.MaintenanceDataForm;
import cn.edu.nsmc.modules.sys.service.impl.SysMaintenanceDataServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("sys/maintenance/data")
public class SysMaintenanceDataController {
    @Autowired
    private SysMaintenanceDataServiceImpl sysMaintenanceDataService;
    @PostMapping("getRepairmanList")
    public R getList(@RequestBody MaintenanceDataForm maintenanceDataForm, Integer page, Integer size){
        return sysMaintenanceDataService.getList(maintenanceDataForm,(page-1) * size,size);
    }
    @PostMapping("getRecordList")
    public R getRecordList(@RequestBody MaintenanceDataForm maintenanceDataForm, Integer page, Integer size){
        return sysMaintenanceDataService.getRecordList(maintenanceDataForm,(page-1) * size,size);
    }
    @PostMapping("exportExcel")
    public R exportExcel(@RequestBody MaintenanceDataForm maintenanceDataForm){
        return sysMaintenanceDataService.exportExcel(maintenanceDataForm);
    }
}
